//package com.dotflat.satistics.vo.home;
//
//import com.matt.foundation.utils.MathUtil;
//import lombok.Data;
//
//import java.util.Map;
//
//import static com.matt.foundation.function.TimeComputeFunction.TIME_NAME;
//
///**
// * *******************************
// * Created by Tim.
// * form com.matt
// * on 2018/7/25
// * *******************************
// */
//@Data
//public class DayNurseryRateVo {
//    private String timeName;
//    private int planCount;
//    private int limitCount;
//    private int actualCount;
//    private double completeRate;
//
//    public static DayNurseryRateVo of(Map map, double planAmount){
//        DayNurseryRateVo vo = new DayNurseryRateVo();
//        vo.setTimeName(map.get(TIME_NAME).toString());
//        vo.setPlanCount(MathUtil.doubleToInt(planAmount));
//        vo.setActualCount(map.get("actualCount") == null ? 0 : Integer.valueOf(map.get("actualCount").toString()));
//        vo.setLimitCount(map.get("limitCount") == null ? 0 : Integer.valueOf(map.get("limitCount").toString()));
//        vo.setCompleteRate(MathUtil.divide(vo.getActualCount(), vo.getLimitCount()));
//        return vo;
//    }
//}
